#ifndef __SINGLETON_H__
#define __SINGLETON_H__


template <typename T>
class SingleTon
{
	static T* m_instance;
public:
	static T* GetInstance();
};

template <typename T>
T* SingleTon<T>::m_instance = NULL;

template <typename T>
T* SingleTon<T>::GetInstance()
{
	if (NULL == m_instance)
		m_instance = new T();
	return m_instance;
}


#endif